@config.main("Download RNA-seq") {

    <div class="body-box">
        <div class="page-box">

            @config.subTitle("Download RNA-seq")

            <div class="main-body">

                <form class="registration-form col-sm-12 my-form" id="form">

                    <div class="col-sm-12 form-group my-position">
                        <label class="col-sm-2 my-position-title">Treatment :</label>
                        <div class="col-sm-9">
                            <textarea class="form-control" type="text" rows="5" name="treat" id="treat"></textarea>
                            <span  >
                                e.g.,&nbsp;<a href="javascript:void(0);" onclick="getEg()"><em class="egCrics">Example</em></a></span>
                        </div>
                    </div>

                    <div class="col-md-12 form-group">
                        <label class="col-sm-2"></label>
                        <button type="button" class="btn my-btn" style="width: 200px" onclick="Download()">
                            Download</button>

                    </div>
                </form>
            </div>
        </div>
    </div>


    <script src="@routes.Assets.versioned("FileSaver.js-master/FileSaver.min.js")" type="text/javascript"></script>

    <script>

        $(function () {

        })

        function getEg() {
            let id = "MsG0180002976.01.T01,MsG0380015714.01.T01,MsG0180000086.01.T01,MsG0380017964.01.T01," +
                    "MsG0480023786.01.T01,MsG0880043918.01.T01,MsG0480021508.01.T02,MsG0580027530.01.T01," +
                    "MsG0580027847.01.T01,MsG0780040648.01.T02,MsG0180000408.01.T01,MsG0680030753.01.T01," +
                    "MsG0580024606.01.T01,MsG0280006748.01.T01,MsG0380014331.01.T01,MsG0580030208.01.T01," +
                    "MsG0480021653.01.T01,MsG0880043257.01.T01,MsG0780036639.01.T01";
            $("#treat").val(id);
        }

        function Download() {
            $.ajax({
                url:"@routes.RNASeqController.downloadRNASeq()",
                type:"post",
                data:$("#form").serialize(),
                success:function (data) {
                    let fileName = "RNA-seq.xls";
                    let blob = new Blob([data], {
                        type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8"
                    });
                    saveAs(blob, fileName)
                }
            })
        }

    </script>

}

